package com.baymax.study.base.beanLifeCycle;

import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * EventHandler
 *
 * @author Baymax
 * @since 2025-01-03
 */
@Component
public class MyEventHandler {
    @EventListener(classes = ApplicationReadyEvent.class)
    public void handleEvent() {
        System.out.println("[09]发布ApplicationReadyEvent事件--来源于SpringBoot，Spring环境不会触发该方法");
    }
}
